﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using PPFinance.Controls;
using System.Windows.Data;

namespace PPFinance.UI.NavMenu
{
    public partial class NavMenu : UserControl
    {
        public NavMenu()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(NavMenu_Loaded);
        }

        void NavMenu_Loaded(object sender, RoutedEventArgs e)
        {
            var item1 = new AccordionItem() { Header = "收支管理" };

            var item1Content = new StackPanel();
          //  item1Content.Width = 300;
        
            item1.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
       
            item1Content.Children.Add(new NavBarItem() { Text = "添加支出", Height = 25 });
            item1Content.Children.Add(new NavBarItem() { Text = "添加收入", Height = 25 });
            item1Content.Children.Add(new NavBarItem() { Text = "支出报表", Height = 25 });
            item1Content.Children.Add(new NavBarItem() { Text = "收入报表", Height = 25 });
            item1Content.Children.Add(new NavBarItem() { Text = "支出收入统计", Height = 25 });
            item1.Content = item1Content;
            adNavMenu.Items.Add(item1);

            var item2 = new AccordionItem() { Header = "系统设置" };
            var item2Content = new StackPanel();
            item2.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
            item2Content.Children.Add(new NavBarItem() { Text = "支出类别设置", Height = 25 });
            item2Content.Children.Add(new NavBarItem() { Text = "收入类别设置", Height = 25 });
            item2Content.Children.Add(new NavBarItem() { Text = "卡设置", Height = 25 });
            item2Content.Children.Add(new NavBarItem() { Text = "现金管理", Height = 25 });
            item2Content.Children.Add(new NavBarItem() { Text = "用户设置", Height = 25 });
            item2.Content = item2Content;
            adNavMenu.Items.Add(item2);
            this.UpdateLayout();

        }


    }
}
